package com.ajx.blog.service.api;

import com.ajx.blog.entity.Article;
import com.ajx.blog.entity.ArticleComment;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface ArticleService extends IService<Article> {

    int collect(Integer aid, Integer uid);

    List<Article> selectArticleList(Integer bloguid);

    List<Article> selectByQW(QueryWrapper<Article> articleQueryWrapper);

    int addArticle(Article article);

    PageInfo<Article> selectPgeInfoByQW(QueryWrapper<Article> qw, Integer pageNum, Integer pageSize);

    boolean updateArticle(Article article);

    Article selectbyId(Integer aid);

    List<Article> selectByExample(Article article);

    List<ArticleComment> selectArticle(Integer aid);

    boolean addComment(ArticleComment articleComment);

    List<Article> selectHottest();

    List<Article> selectByMap(Map<String, Object> stringStringMap);

    PageInfo<Article> selectPageInfoByEample(Article article, Integer pageNum, Integer pageSize);

    /**
     * @param {String} status 文章状态 -1审核不通过 0待审核 1审核通过
     * @return {Integer} 文章数量
     * 
     * @description: 按状态查询文章数量
     */
    Integer countByStatus(String status);

    /**
     * @param {*}
     * @return {Integer} 所有文章数量
     * 
     * @description: 查询所有文章数量
     */
    Integer selectCllArticleCount();

    PageInfo<Article> selectByMapPageInfo(Map<String, Object> stringObjectMap, Integer pageNum, Integer pageSize);

    Article selectArticleLists(Integer atricleid);

    List<Article> selectTime(int i);

    List<Article> selectByExamples(Map<String, Object> stringIntegerMap);

}
